package com.cxx.purchasecharge.core.model.persistence;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.cxx.purchasecharge.core.model.BaseModel;

/**
 * 客户跟进计划
 */
@Entity
@Table (name = "pc_customer_follow")
public class CustomerFollow extends BaseModel
{
    private static final long serialVersionUID = 1L;

    private long id;
    private String subject;

    private FollowWay way;
    /**
     * 1 -> h 2 -> m 3 -> l
     */
    private int priority = 3;
    private String customerName;
    private String customerStatus;

    private Date last;
    private String result;

    private String point;
    private Date next;
    
    public CustomerFollow () {}

    @Id
    @GeneratedValue (strategy = GenerationType.AUTO)
    public long getId ()
    {
        return id;
    }

    public void setId (long id)
    {
        this.id = id;
    }

    @Column (nullable = false, unique = true)
    public String getSubject ()
    {
        return subject;
    }

    public void setSubject (String subject)
    {
        this.subject = subject;
    }

    @Column (nullable = false)
    public int getPriority ()
    {
        return priority;
    }

    public void setPriority (int priority)
    {
        this.priority = priority;
    }

    @Column (nullable = false)
    public String getCustomerName ()
    {
        return customerName;
    }

    public void setCustomerName (String customerName)
    {
        this.customerName = customerName;
    }

    public String getCustomerStatus ()
    {
        return customerStatus;
    }

    public void setCustomerStatus (String customerStatus)
    {
        this.customerStatus = customerStatus;
    }

    @ManyToOne
    @JoinColumn (name = "follow_way_id", nullable = false)
    public FollowWay getWay ()
    {
        return way;
    }

    public void setWay (FollowWay way)
    {
        this.way = way;
    }

    public Date getLast ()
    {
        return last;
    }

    public void setLast (Date last)
    {
        this.last = last;
    }

    public String getResult ()
    {
        return result;
    }

    public void setResult (String result)
    {
        this.result = result;
    }

    public String getPoint ()
    {
        return point;
    }

    public void setPoint (String point)
    {
        this.point = point;
    }

    public Date getNext ()
    {
        return next;
    }

    public void setNext (Date next)
    {
        this.next = next;
    }

}
